<template>
    <input type="text" v-focus>
</template>
<script setup>
//自定义指令使用v开头后面跟上驼峰的指令名

let vFocus = {
    mounted (el,binding) {
        console.log(el);
        el.focus()
    }
}
</script>